package com.ele.dao;

import com.ele.pojo.Food;

import java.sql.SQLException;
import java.util.List;

public interface FoodDao {
    /**
     * 根据菜品分类id和店家id来查询菜品以及分页
     * @param currentPage
     * @param pageSize
     * @param categoryId
     * @param shopId
     * @param foodName
     * @return
     * @throws Exception
     */
    List<Food> findFoodList(String currentPage,String pageSize,String categoryId, String shopId ,String foodName) throws SQLException;

    /**
     * 根据店铺id查这个店铺的菜品总数
     * @param shopId
     * @return
     * @throws SQLException
     */
    Long foodCount(String shopId) throws SQLException;

    /**
     * 添加菜品
     * @param food
     * @return
     * @throws SQLException
     */
    Integer addFood(Food food)throws SQLException;

    /**
     * 根据菜品id修改
     * @param food
     * @return
     * @throws SQLException
     */
    Integer updateFood(Food food)throws SQLException;

    /**
     * 根据菜品id删除
     * @param foodId
     * @return
     */
    Integer deleteFood(String foodId)throws SQLException;
}
